home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Snippets / GetFileIcon 1.1 / 1.1 ReadMe.c < prev    next >
Encoding:
Text File  |  1995-03-15  |  2.1 KB  |  47 lines  |  [TEXT/KAHL]

  1. /*
  2. GetFileIcon.c
  3. 3/15/95
  4. ver 1.1
  5.  
  6. First, I'd like to say that I tried to make GetFileIcon (GFI) accessable to as many
  7. developers and development environment platforms possible.  If you are still using
  8. the old universal headers, use the THINK C or CodwWarrior project in the "Old Headers"
  9. folder.  If you use the new universal headers (for PPC & 68k development), check out
  10. the files in the "Universal Headers" folder.
  11.  
  12. Second, I'd like to say that none of this would have been possible without the aid of
  13. Erik A. Johnson (johnsone@uxh.cso.uiuc.edu).  Erik provided fixes to the code so it could
  14. be compiled in CodwWarrior, implemented the Universal Headers ProcPtr code, and
  15. informed me of several bugs.
  16.  
  17.  
  18. Here are some notes that Erik sent me:
  19.  
  20. Modified: 3/1/95 by eaj  -- removed the 680x0 assembly from FindGenericIconID() and
  21.                             put the data in the globals gGenericFinderIcons and
  22.                             gGenericSysIcons
  23.                          -- removed most of GetFileIcon.h because most of it reproduced
  24.                             the Universal Header files Icons.h and Finder.h (these are
  25.                             now included within the new GetFileIcon.h.
  26.                          -- added a call to PBHGetVolParms() in InOneDesktop() to make
  27.                             sure a volume supports the Desktop Manager before trying to
  28.                             examine the Desktop database in that volume
  29.                          -- modified the calls to ForEachIconDo() (in the routines
  30.                             GetNormalFileIcon(), CopyEachIcon(), Get1IconSuite(), and
  31.                             IsSuiteEmpty()) to use UniversalProcPtr's.
  32.  
  33. Compiles fine with CW5 (MW C/C++ 1.2).  I haven't tried it with MPW PPCC or THINK C.
  34. To use GetFileIcon(), include GetFileIcon.c in your project, and in your source do
  35. something like:
  36.  
  37. #include "GetFileIcon.h"
  38.  
  39. FSSpec  myFileFSSpec;
  40. Handle  myIconSuite;
  41. OSErr   err;
  42. Rect    myRect={0,0,32,32};
  43.  
  44. err = GetFileIcon( &myFileFSSpec, svAllAvailableData, &myIconSuite );
  45. PlotIconSuite( &myRect, atNone, ttNone, myIconSuite );
  46. */          
  47.